Skip to content

Conversation

@dvaldivia
Copy link
Collaborator

Defines a strict <base href="/" /> tag to load all assets in relation to the root
Introduces support for the parameter cpb when requesting the index from the target console server, so the hop can replace this in the <base /> tag
Introduces CONSOLE_SUBPATH to instruct the console server to set a base to that value

To test this

You need the assets, so make assets before testing this PR.

Benjamin Perez and others added 2 commits November 20, 2021 13:27
Signed-off-by: Daniel Valdivia <[email protected]>
harshavardhana
harshavardhana previously approved these changes Nov 22, 2021
Copy link
Collaborator

@bexsoft bexsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an issue with HOP, Seems like server is returning some sort of empty page when trying to use this functionality. The rest of modules are working fine
Screen Shot 2021-11-22 at 12 55 45
Screen Shot 2021-11-22 at 12 55 15
Screen Shot 2021-11-22 at 12 55 08
Screen Shot 2021-11-22 at 12 54 55
Screen Shot 2021-11-22 at 12 58 51

Signed-off-by: Daniel Valdivia <[email protected]>
Signed-off-by: Daniel Valdivia <[email protected]>
Copy link
Collaborator

@bexsoft bexsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, LGTM, For HOP functionality had a demo with @dvaldivia

@prakashsvmx
Copy link
Member

Gets into this state: (2 Headers)

Steps:
Create a tenant -> View Details - Back -> Manage Tenant

Manage Tenant

weired_state

@dvaldivia
Copy link
Collaborator Author

@prakashsvmx it's hard to test this on the yarn server at 5005, try using the go server on 9090, did you make assets before running the go server?

Copy link
Member

@prakashsvmx prakashsvmx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works fine in 9090.

@dvaldivia dvaldivia merged commit 53d278a into minio:master Nov 23, 2021
@dvaldivia dvaldivia deleted the define-base-for-assets branch November 23, 2021 05:02
@RafalSkolasinski
Copy link

RafalSkolasinski commented Nov 25, 2021

Is it known when will this make it to the release? I tried with latest image (RELEASE.2021-11-24T23-19-33Z) from https://quay.io/repository/minio/minio?tag=latest&tab=tags and it does not seem to work

@harshavardhana
Copy link
Member

Is it known when will this make it to the release? I tried with latest image (RELEASE.2021-11-24T23-19-33Z) from https://quay.io/repository/minio/minio?tag=latest&tab=tags and it does not seem to work

@RafalSkolasinski we haven't added support for this in MinIO yet. This is not a high-priority item for us at the moment.

We will get it to it when we can.

@harlequin
Copy link

I have tried today with the subpath feature ... somehow it's not working

My goal is to have a url like

https://domain.de/minio <- For UI/console access

Can somebody provide an example how to use?

@Dragos0000
Copy link

@dvaldivia Where do we have to put this CONSOLE_SUBPATH and what should be the value?
I am trying to have nginx as a proxy and access minio console by having /minio instead of :9001 using docker for deployment.
It seems it doesn't load any of the static resources as is looking in the wrong place and it is not adding /minio/ in the requests.
docker compose file:


services:
  minio-s3:
    image: minio/minio:latest
    ports:
      - ${MINIO_PORT}:9000
      - 9001:9001
    environment:
      - MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
      - MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
      - CONSOLE_SUBPATH=/minio/
    command:
      server --console-address :9001 /data
    volumes:
      - s3-disk:/data 

nginx config

events {
}

http {
  error_log /etc/nginx/error_log.log warn;
  client_max_body_size 20m;
  
  proxy_cache_path /etc/nginx/cache keys_zone=one:500m max_size=1000m;

  server {
    server_name localhost;

    location /minio {
       rewrite ^/minio(.*)$ /$1 break;

       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header X-Forwarded-Proto $scheme;
       proxy_set_header Host $http_host;

       proxy_connect_timeout 300;
       # Default is HTTP/1, keepalive is only enabled in HTTP/1.1
       proxy_http_version 1.1;
       proxy_set_header Connection "";
       chunked_transfer_encoding off;

       proxy_pass http://minio-s3:9001; # If you are using docker-compose this would be the hostname i.e. minio
       # Health Check endpoint might go here. See https://www.nginx.com/resources/wiki/modules/healthcheck/
       # /minio/health/live;
    }

     listen 80;
     # To allow special characters in headers
     ignore_invalid_headers off;
     # Allow any size file to be uploaded.
     # Set to a value such as 1000m; to restrict file size to a specific value
     client_max_body_size 1000m;
     # To disable buffering
     proxy_buffering off;

  }  
}

@PedroHRDiniz
Copy link

PedroHRDiniz commented Jan 4, 2022

Hi @dvaldivia. I'm in the same situation as @Dragos0000. Could you please give us an example of CONSOLE_SUBPATH configuration?

I'm using minio version RELEASE.2021-12-20T22-07-16Z

@dvaldivia
Copy link
Collaborator Author

@PedroHRDiniz @Dragos0000 should be fixed by #1384

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants